package br.com.ledger.view;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JDialog;
import javax.swing.JEditorPane;
import javax.swing.JPanel;

import br.com.ultimate.components.InfoPane;
import br.com.ultimate.components.LButton;


public class TelaSobre extends JDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private final JPanel contentPanel = new JPanel();

	/**
	 * Create the dialog.
	 */
	public TelaSobre() {
		setLocationRelativeTo(TelaInicial.getInstance());
		setTitle(" Contabilidade - Sobre");
		setResizable(false);
		setModal(true);
		setSize(497, 349);
		int xl, yl;
		xl = Toolkit.getDefaultToolkit().getScreenSize().width/2 - getSize().width/2;
		yl = Toolkit.getDefaultToolkit().getScreenSize().height/2 - getSize().height/2;
		setLocation(xl,yl);
		getContentPane().setLayout(new BorderLayout());
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(new BorderLayout(0, 0));
		
		JPanel panel = new JPanel();
		contentPanel.add(panel);
		panel.setLayout(new BorderLayout(0, 0));
		
		JEditorPane dtrpndesenvolvedores = new JEditorPane();
		dtrpndesenvolvedores.setDisabledTextColor(Color.DARK_GRAY);
		dtrpndesenvolvedores.setEnabled(false);
		dtrpndesenvolvedores.setBackground(new Color(0,0,0,0));
		dtrpndesenvolvedores.setContentType("text/html");
		dtrpndesenvolvedores.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
		dtrpndesenvolvedores.setText("<html>\r\n<b style='font-family:tahoma;font-size:12;'>Desenvolvedores:</b>\r\n<div style='font-size:13;padding-left:10px;'>\r\n<table border='0' width='100%'><tr>\r\n<td>Andr\u00E9 Luiz dos Anjos</td>\r\n<td>Felipe Jaconis Dias</td></tr>\r\n<tr><td>Fl\u00E1vio Elissandro</td>\r\n<td>Huiter Gabriel da Luz Santos</td></tr>\r\n<tr><td>Leandro Silva Luz do Carmo</td>\r\n<td>Marco Rosendo Beltrani</td></tr>\r\n<tr><td>Rodrigo Rocha Bichiarov</td></tr>\r\n</table></div>\r\n<p style='font-family:tahoma;font-size:12;'><b>Copyrights</b></p>\r\n<div style='font-size:12;margin-left:10px;'>\r\n Copyright \u00A9 2011, Oracle and/or its affiliates. All rights reserved.<br> Application Icons: Copyright \u00A9 2009 Aha-Soft. All rights reserved.<br> JTattoo: Copyright (c) 2002-2011 by MH Software-Entwicklung. All Rights Reserved.\r\n</div>\r\n</html>");
		dtrpndesenvolvedores.setEditable(false);
		panel.add(dtrpndesenvolvedores);
		
		JPanel panel_1 = new JPanel();
		FlowLayout flowLayout = (FlowLayout) panel_1.getLayout();
		flowLayout.setAlignment(FlowLayout.RIGHT);
		panel.add(panel_1, BorderLayout.SOUTH);
		
		LButton btnNewButton = new LButton("Fechar");
		btnNewButton.setPreferredSize(new Dimension(90, 40));
		panel_1.add(btnNewButton);
		btnNewButton.setForeground(new Color(230, 230, 250));
		btnNewButton.setBackground(new Color(100, 149, 237));
		btnNewButton.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				dispose();
			}
		});
		
		InfoPane infoPane = new InfoPane();
		infoPane.setIcon(Toolkit.getDefaultToolkit().getImage(TelaSobre.class.getResource("/res/ledger_icon.png")));
		infoPane.setForeground(new Color(205, 133, 63));
		infoPane.setBackground(new Color(230, 230, 250));
		infoPane.setText("     Ledger");
		contentPanel.add(infoPane, BorderLayout.NORTH);
		
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
	}
}
